using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;

namespace One_Crappy_RPG
{
    public class GameScreen
    {
        public float screenDepth;
        public bool isPopUp;
        public bool isActive;
        public bool hasFocus;
        public bool isCovered;
        public bool isTransitioning = false;
        public bool isExiting = false;

        public GameScreen()
        {
            Initialize();
        } 

        #region virtual methods
        public virtual void Initialize()
        {
            screenDepth = 0;
            isPopUp = false;
            isActive = true;
            hasFocus = true;
            isCovered = false;
            InputManager.Update();
        } 

        public ScreenManager ScreenManager
        {
            get { return screenManager; }
            internal set { screenManager = value; }
        } 

        ScreenManager screenManager; 

        public virtual void LoadContent()
        {
        }

        public virtual void UnloadContent()
        {
        }

        public virtual void Update(GameTime gameTime)
        {
            if (hasFocus && isActive)
            {
                HandleInput();
            }
        }

        public virtual void Draw(GameTime gameTime)
        {
        }

        /// <summary>
        /// This should be called from the base update method
        /// input should be entered in the derriving class
        /// </summary>
        public virtual void HandleInput()
        {
        }
        #endregion

    }
}
